@flogeez/angular-tiptap-editor 3.5.5 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -1
- package/README.md +2 -2
- package/esm2022/lib/components/editor/angular-tiptap-editor.component.mjs +93 -21
- package/esm2022/lib/config/ate-editor.config.mjs +3 -1
- package/esm2022/lib/config/ate-slash-commands.config.mjs +2 -1
- package/esm2022/lib/extensions/ate-block-shortcuts.extension.mjs +100 -0
- package/esm2022/lib/extensions/ate-pasted-image.extension.mjs +7 -3
- package/esm2022/lib/i18n/ateTranslationsModel.mjs +1 -1
- package/esm2022/lib/i18n/es_ateTranslations.mjs +230 -0
- package/esm2022/lib/i18n/pt_ateTranslations.mjs +220 -0
- package/esm2022/lib/models/ate-editor-config.model.mjs +1 -1
- package/esm2022/lib/models/ate-editor-ref.mjs +3 -3
- package/esm2022/lib/models/ate-image.model.mjs +12 -2
- package/esm2022/lib/services/ate-editor-commands.service.mjs +6 -3
- package/esm2022/lib/services/ate-i18n.service.mjs +19 -9
- package/esm2022/lib/services/ate-image.service.mjs +18 -11
- package/esm2022/lib/utils/ate-extensions.utils.mjs +79 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/flogeez-angular-tiptap-editor.mjs +778 -46
- package/fesm2022/flogeez-angular-tiptap-editor.mjs.map +1 -1
- package/lib/components/editor/angular-tiptap-editor.component.d.ts +12 -2
- package/lib/config/ate-slash-commands.config.d.ts +2 -0
- package/lib/extensions/ate-block-shortcuts.extension.d.ts +32 -0
- package/lib/i18n/ateTranslationsModel.d.ts +1 -1
- package/lib/i18n/es_ateTranslations.d.ts +2 -0
- package/lib/i18n/pt_ateTranslations.d.ts +2 -0
- package/lib/models/ate-editor-config.model.d.ts +8 -0
- package/lib/models/ate-image.model.d.ts +30 -2
- package/lib/services/ate-editor-commands.service.d.ts +2 -1
- package/lib/services/ate-i18n.service.d.ts +3 -1
- package/lib/services/ate-image.service.d.ts +5 -3
- package/lib/utils/ate-extensions.utils.d.ts +13 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,11 +5,31 @@ All notable changes to `@flogeez/angular-tiptap-editor` will be documented in th
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), with the exception that the major version is specifically aligned with the major version of [Tiptap](https://tiptap.dev).
|
|
7
7
|
|
|
8
|
+
## [3.6.0] - 2026-10-26
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`starterKitOptions` Input**: New input (also available as `starterKitOptions` in `AteEditorConfig`) typed `Partial<StarterKitOptions>`, forwarded to `StarterKit.configure()` and merged over the library defaults (the default `link` options are kept). It lets apps disable or tune bundled extensions, e.g. `{ undoRedo: false }` to use `@tiptap/extension-collaboration` (Yjs) without the local history conflicting with Yjs' undo manager. Changing it at runtime re-creates the editor. (#61)
|
|
13
|
+
- **`imageRejected` Output**: Emits an `AteImageRejection` (`{ reason: 'invalid-type' | 'too-large' | 'upload-failed', file, source: 'paste' | 'drop' | 'picker' | 'api' }`) when an image file is not inserted, so apps can tell the user why. Covers clipboard files, drag-and-drop, the toolbar, slash-menu and bubble-menu pickers, and `uploadImage`. (#64)
|
|
14
|
+
- **`AteImageValidationError`**: Typed error (`reason: 'invalid-type' | 'too-large'`, translated `message`) thrown by the upload pipeline when `allowedTypes` or `maxSize` validation fails. (#64)
|
|
15
|
+
- **Brazilian Portuguese and Spanish Translations**: Built-in `pt` (Brazilian wording) and `es` locales covering every `AteTranslations` key, including slash command titles, descriptions and search keywords (English keywords are kept, so typing English still finds the command). (#68)
|
|
16
|
+
- **Block Keyboard Shortcuts**: `Mod+D` duplicates the current block right after it, and `Mod+Shift+ArrowUp` / `Mod+Shift+ArrowDown` move it up or down by one sibling, keeping the selection inside the moved block. Inside a list the block is the list or task item and it moves within its list. At the edges and in read-only editors the key event is not consumed. Enabled by default and controlled by the new `enableBlockShortcuts` input / config option. (#66)
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **Browser Language Detection**: Detection now matches any built-in or registered locale from `navigator.language`, so `pt-BR`, `es-MX` and `de-DE` pick `pt`, `es` and `de` automatically (previously only `fr` was auto-detected and all other browsers fell back to `en`). A regional tag such as `pt-BR` passed to `locale` or `setLocale()` resolves to its language translations. (#68)
|
|
21
|
+
- **Custom Extensions in `tiptapExtensions` Override Built-ins**: An extension passed in `tiptapExtensions` whose `name` matches a built-in ATE extension (`highlight`, `textStyle`, `textAlign`, `placeholder`, `resizableImage`, ...) or a `StarterKit` extension (`link`, `codeBlock`, `heading`, ...) now replaces the built-in extension instead of being silently dropped or duplicating the `StarterKit` extension. If the same `StarterKit` extension is also configured in `starterKitOptions`, the custom extension in `tiptapExtensions` takes precedence. In Angular development mode (`isDevMode()`), a one-time `[ATE]` `console.warn` per editor instance lists the replaced extensions, the ATE UI features and state calculators that depend on them, and any ignored `starterKitOptions` keys. (#70)
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- **Silent Image Validation Failures**: A file rejected for its type or size used to disappear with only a `console.error`, and file paste and drop turned the failure into an unhandled promise rejection. Failures are now reported through `imageRejected`, and paste, drop and the fire-and-forget commands (`execute('insertImage' | 'uploadImage')`, `AteEditorRef.insertImage` / `uploadImage`) no longer leak unhandled rejections. Awaited `uploadImage()` calls still reject. (#64)
|
|
26
|
+
- **`pastedImageRejected` Reasons**: A base64 image in pasted HTML rejected by validation now reports `invalid-type` or `too-large` instead of `upload-failed`, which stays reserved for upload handler failures. (#64)
|
|
27
|
+
|
|
8
28
|
## [3.5.5] - 2026-10-26
|
|
9
29
|
|
|
10
30
|
### Fixed
|
|
11
31
|
|
|
12
|
-
- **Color Picker Anchor in Seamless Mode**: The text color and highlight pickers opened from the bubble menu are now anchored to the selected text even when `seamless` is enabled. The
|
|
32
|
+
- **Color Picker Anchor in Seamless Mode**: The text color and highlight pickers opened from the bubble menu are now anchored to the selected text even when `seamless` is enabled. The colored-element lookup is now bounded to the elements inside the editor content. (#72)
|
|
13
33
|
- **Editor Re-created on Unrelated `config` Changes**: Any change to the `[config]` input (for example switching `theme` between `dark` and `light`) destroyed and re-created the Tiptap editor, losing the caret, selection, undo history and node views. The effective extensions, Tiptap options and Angular nodes are now compared by value, so a new array or object with the same content no longer re-initializes the editor. Changing the actual extension list, Tiptap options, Angular nodes or `blockControls` still does. (#62)
|
|
14
34
|
|
|
15
35
|
## [3.5.4] - 2026-10-21
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Yet, I've worked to keep it fully customizable: you can easily configure the edi
|
|
|
32
32
|
- ⌨️ **UX First**: Slash commands (`/`) and context-aware bubble menus (Notion-like).
|
|
33
33
|
- 📊 **Table Power**: Advanced management with cell selection and merging.
|
|
34
34
|
- 🖼️ **Pro Media**: Image resizing, auto-compression, and custom uploaders.
|
|
35
|
-
- 🌍 **Built-in i18n**: Support for English, French, and
|
|
35
|
+
- 🌍 **Built-in i18n**: Support for English, French, German, Brazilian Portuguese, and Spanish out of the box.
|
|
36
36
|
- 📎 **Office-Ready**: Clean pasting from Word and Excel.
|
|
37
37
|
- 🎨 **Highly Customizable**: Easily configure toolbars, bubble menus, and slash command items.
|
|
38
38
|
- 🛠️ **Extensible**: Easily add custom Tiptap extensions and reactive state calculators.
|
|
@@ -180,7 +180,7 @@ Looking for deeper integration patterns? Explore our **[Advanced Usage Guide](./
|
|
|
180
180
|
|
|
181
181
|
## 🌍 i18n & 🎨 Styling
|
|
182
182
|
|
|
183
|
-
- **Languages**: English, French, and
|
|
183
|
+
- **Languages**: English (`en`), French (`fr`), German (`de`), Portuguese (`pt`, Brazilian wording) and Spanish (`es`) built-in. Detects browser language automatically (regional tags like `pt-BR` or `es-MX` resolve to their language). Extend with `AteI18nService.addTranslations()`.
|
|
184
184
|
- **Styling**: Customize via CSS variables (e.g., `--ate-primary`, `--ate-border-radius`, and much more).
|
|
185
185
|
- **Dark Mode**: Works natively by adding `.dark` or `[data-theme="dark"]`.
|
|
186
186
|
|